<script type="text/javascript">
	var ureadmer = getCookie('ureadmer');
	if (ureadmer) {
		setCookie('ureadmer', '', -1);
	}
	
	<{if $is_new_user or $is_show_extension_tip}>
		// insert extension tip into page
		var img	= '';
		var txt	= '';
		var html	= '';
		var w		= $(window).width();
		
		if ($.browser.msie) {
                     	img = '/images/ext_ie9_5.gif';
			txt = '(IE收藏夹快捷方式)';
		} else if ($.browser.mozilla) {
			img = '/images/ext_ff_1.gif';
			txt = '(火狐浏览器扩展 Firefox Extension)';
		} else if ($.browser.chrome) {
			img = '/images/ext_cr_1.gif';
			txt = '(谷歌浏览器扩展 Chrome Extension)';
		} else if ($.browser.opera) {
			img = '/images/ext_cr_1.gif';
		} else if ($.browser.safari) {
			img = '/images/ext_cr_1.gif';
		} else if ($.browser.webkit) {
			img = '/images/ext_cr_1.gif';
			txt = '(谷歌浏览器扩展 Chrome Extension)';
		} else {
			img = '/images/ext_ie9_5.gif';
			txt = '(IE收藏夹快捷方式)';
		}
		html += '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
		html += '<tr><td style="background-color: #FFF; padding: 10px 10px 0 10px;">';
		html += '<div style="background-color:#ACF; height:280px;">';
		html += '	<div style="float:right; padding:20px;">';
		html += '		<img id="home_ext_img" src="'+img+'" width="500" style="border:1px solid #FFF;" onclick="UM_LAYER.open(\'extension/default\');">';
		html += '	</div>';
		html += '	<div style="margin-right: 550px; padding:20px 0 20px 20px;">';
		html += '		<div style="font:bold 18px 微软雅黑; color: #FFF; padding:10px 0 0 0; ">';
		html += '			uReadMe网文摘手<span style="font:14px 微软雅黑; color:#FFF; margin-left:10px;">'+txt+'</span>';
		html += '		</div>';
		html += '		<div style="padding:40px 0 0 40px;">';
		html += '			<li style="font:14px 微软雅黑; color:#FFF; margin-bottom: 10px;">在上网时发现了好文章、好图片，一键保存下来</li>';
		html += '			<li style="font:14px 微软雅黑; color:#FFF; margin-bottom: 10px;">在阅读圈中与好友分享</li>';
		html += '			<li style="font:14px 微软雅黑; color:#FFF; margin-bottom: 10px;">点名推荐给好友，免得他错过了精彩 :D</li>';
		html += '		</div>';
		html += '		<div style="text-align:right; padding:40px 20px 0 0;">';
		html += '			<a style="font:14px 微软雅黑; color:#FFF; text-decoration: underline;" onclick="UM_LAYER.open(\'extension/default\');">安装</a>';
		html += '			<span style="font:14px 微软雅黑; color:#FFF; margin:0 10px;">|</span>';
		html += '			<a style="font:14px 微软雅黑; color:#FFF; text-decoration: underline;" onclick="UM_LAYER.open(\'extension/default\');">了解详情</a>';
		html += '		</div>';
		html += '	</div>';
		html += '</div>';
		html += '</td></tr></table>';
		
		$('#index_main_table').before(html);
	<{/if}>
		
	<{if $is_new_user}>
		// show Mask of index
		html = '';
		html += '<table id="help_index" width="100%" cellpadding="0" cellspacing="0" border="0" style="position:absolute; border:none; top:0px; left:0px; right:0px; bottom: 0px; width:100%; opacity: .50; filter:Alpha(Opacity=50)">';
		html += '<tr>';
		html += '<td width="'+((w - $('#index_main_table').width())/2)+'" style="background-color:#000;">&nbsp;</td>';
		html += '<td width="'+($('#index_main_table').width())+'"><img src="/images/help_mask_3.png" width="1000" height="500"></td>';
		html += '<td width="'+((w-$('#index_main_table').width())/2)+'" style="background-color:#000;">&nbsp;</td>';
		html += '</tr>';
		html += '<tr><td colspan="3" height="1200" valign="top" style="background-color:#000; text-align:center;">&nbsp;</td></tr>';
		html += '</table>';
		<{if $recommend_info}>
			// Mask label have 5 step
			html += '<div id="help_index_label">';
			html += '	<img src="/images/help_label_4.png" style="position:absolute; top:100px; left:20px;">';
			html += '	<img src="/images/help_label_5.png" style="position:absolute; top:360px; left:'+((w-$('#index_main_table').width())/2 + 350)+'px;">';
			html += '	<img src="/images/help_button_ok.png" style="position:absolute; top:500px; left:'+(w/2 - 200)+'px; cursor:pointer;" onclick="$(\'#help_index\').remove(); $(\'#help_index_label\').remove();" onmouseover="$(this).attr(\'src\', \'/images/help_button_ok_hover.png\')" onmouseout="$(this).attr(\'src\', \'/images/help_button_ok.png\')">';
			html += '</div>';
			$('#index_main_table').after(html);
			// popup recommend reader
			open_reader('<{$recommend_info.id}>', '<{$recommend_info.open_type}>', function(){ setCookie('is_new_user', '', -1);  home.recommend_is_read('<{$recommend_info.id}>'); });
		<{else}>
			// Mask label have 2 step only
			html += '<div id="help_index_label">';
			html += '	<img src="/images/help_label_4_as_1.png" style="position:absolute; top:100px; left:20px;">';
			html += '	<img src="/images/help_label_5_as_2.png" style="position:absolute; top:360px; left:'+((w-$('#index_main_table').width())/2 + 350)+'px;">';
			html += '	<img src="/images/help_button_ok.png" style="position:absolute; top:500px; left:'+(w/2 - 200)+'px; cursor:pointer;" onclick="$(\'#help_index\').remove(); $(\'#help_index_label\').remove();" onmouseover="$(this).attr(\'src\', \'/images/help_button_ok_hover.png\')" onmouseout="$(this).attr(\'src\', \'/images/help_button_ok.png\')">';
			html += '</div>';
			$('#index_main_table').after(html);
			setCookie('is_new_user', '', -1);
		<{/if}>
	<{else}>
		<{if $recommend_info}>
			// popup recommend reader
			open_reader('<{$recommend_info.id}>', '<{$recommend_info.open_type}>', function(){ home.recommend_is_read('<{$recommend_info.id}>'); });
		<{/if}>
	<{/if}>
</script>